#ifndef LM75AD_H__
#define LM75AD_H__
#include "gd32f10x.h"
#include "i2c.h"
#define LM75AD_ADDR 0x9e
#define TEMP_REG 0x00
#define CONF_REG 0x01
#define THYST_REG 0x02
#define TOS_REG 0x03

#define IIC_WRITE 0
#define IIC_READ 1
//获取温度
float lm75ad_get_temp(void);
//关断传感器
void lm75ad_power_off(void);
//读寄存器值
void lm75ad_read_reg(uint8_t lm75ad_id,uint8_t reg,uint8_t *buf,uint8_t len);
//向iic总线写入器件地址和寄存器地址
uint8_t lm75ad_write_addr(uint8_t lm75ad_id,uint8_t reg);
#endif
